import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home.vue'
import Live from '../views/live.vue'
import My from '../views/my.vue'
import Tiekct from '../views/tiekct.vue'
import Vip from '../views/vip.vue'
// 引入二级路由
import Phb from '../components/hometwo/paihangbang.vue'
import Jxb from '../components/hometwo/jingxuanbang.vue'
import Xq from '../views/details.vue'
//  引入404页面
import Not from '../views/not.vue'
// 引入列表页面
import Cl from '../views/conlist.vue'
// 引入境外页面
import Jw from '../views/jingwai.vue'
// 引入数据测试页面
import Dt from '../views/data.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: Home,
    children:[
     {
       path: '/',
       name: 'Phb',
       component: Phb,
    },
    { path: '/jingxuanbang',
      name: 'Jxb',
      component: Jxb,
    },
 
    ]
   
  },
  {
    path: '/live',
    name: 'Live',
    component: Live
  },
  {
    path: '/my',
    name: 'My',
    component: My
  },
  {
    path: '/tiekct',
    name: 'Tiekct',
    component: Tiekct
  },
  {
    path: '/vip',
    name: 'Vip',
    component: Vip
  },
  {
    path: '/details',
    name: 'Xq',
    component: Xq
  },
  {
    path: '/conlist',
    name: 'Cl',
    component: Cl
  },
  {
    path: '/jingwai',
    name: 'Jw',
    component: Jw
  },
  // 数据页面测试
  {
    path: '/data/:dtitle',
    name: 'Dt',
    component: Dt
  },
  {
    path: '/',
    redirect: '/home',
    
  },
  {
    path: '/*',
    name: 'Not',
    component: Not
  },

  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
